/*
 * Message.java
 *
 * Created on August 13, 2006, 12:38 AM
 *
 */

package org.letva.copie.common.message;

import java.io.*;
import java.util.Date;
/**
 *
 * @author Vuk Nikolic
 */
public class Message implements Serializable{
    
    private static final long serialVersionUID = 1L;
    
    private String sender = null; // ko salje
    private String reciever = null; // kome salje
    private Object info = null; // ono sto se salje
    private Date timestamp = null; //200608131238
    private String type = null; // da li je normlana ili sistemska poruka
 
    private int length = 0;
    public Message(){ }
    public Message(String send, String rec, Object t){ 
        sender = send;
        reciever = rec;
        info = t; 
        type = "normal";
        timestamp = new Date();
    }

    public String getSender() {
        return sender;
    }

    public String getReciever() {
        return reciever;
    }

    public Object getInfo() {
        return info;
    }

    public void setInfo(Object info) {
        this.info = info;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public String getType() {
        return type;
    }
    
    public void setType(String s){
        type = s;
    }

	@Override
    public String toString(){
        return info.toString();
    }

}
